home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
hypercrd
/
hc1_2_x
/
almanac1.sit
/
Almanac 1.82.sit
/
Almanac
/
card_11225.txt
< prev
next >
Wrap
Text File
|
1990-04-21
|
8KB
|
376 lines
-- card: 11225 from stack: in
-- bmap block id: 11518
-- flags: 0000
-- background id: 6859
-- name:
----- HyperTalk script -----
on calc
if cd fld RA is empty then set hilite of btn "Use 1950 Coords" to false
if cd fld RA2 is empty then set hilite of btn "Use 1950 Coords" to true
set cursor to watch
ST
if hilite of btn "Use 1950 Coords" then
conv
put 15*(cd fld RA + cd fld RAm/60) into dra
put sgn(cd fld Dec)*(abs(cd fld Dec)+cd fld Decm/60) into dec
else
conv2
put 15*(cd fld RA2 + cd fld RA2m/60) into dra
put sgn(cd fld Dec2)*(abs(cd fld Dec2)+cd fld Dec2m/60) into dec
end if
put pi/180 into fac
put line 1 of cd fld "Coords" of cd origin into lat
-- calc alt and az of object
put ((360+15*(line 2 of fld ST)-dra) mod 360) into LHA
put cosd(LHA)*sind(lat)-tand(dec)*cosd(lat) into den
put round(atanq(den,sind(LHA))/fac) into temp
put sind(lat)*sind(dec)+cosd(lat)*cosd(dec)*cosd(LHA) into sina
set cursor to busy
if abs(sina)<1 then
put round(atan(sina/(sqrt(1-sina*sina)))/fac) into alt
if alt>0 then
put temp&"┬░" into cd fld Az
put alt&"┬░" into cd fld Al
else
put "---" into cd fld Az
put "---" into cd fld Al
end if
else
beep
end if
end calc
on conv
set cursor to busy
put 15*(cd fld RA + cd fld RAm/60) into ra
put sgn(cd fld Dec)*(abs(cd fld Dec)+cd fld Decm/60) into dec
put .6403615 into M
put .2783378 into N
put ra+(M+N*sind(ra)*tand(dec)) into ram
put dec+N*cosd(ram) into decm
put ra+M+N*sind(ram)*tand(decm) into ra2000
put dec+N*cosd(ram) into dec2000
put trunc(ra2000/15) into cd fld RA2
put rnd10(60*frac(ra2000/15)) into cd fld RA2m
put trunc(dec2000) into cd fld Dec2
put rnd10(60*abs(frac(dec2000))) into cd fld Dec2m
end conv
on conv2
set cursor to busy
put 15*(cd fld RA2 + cd fld RA2m/60) into raz
put sgn(cd fld Dec2)*(abs(cd fld Dec2)+cd fld Dec2m/60) into decz
put .6403615 into M
put .2783378 into N
put raz-(M+N*sind(raz)*tand(decz)) into ramz
put decz-N*cosd(ramz) into decmz
put raz-M-N*sind(ramz)*tand(decmz) into ra1950
put decz-N*cosd(ramz) into dec1950
put trunc(ra1950/15) into cd fld RA
put rnd10(60*frac(ra1950/15)) into cd fld RAm
put trunc(dec1950) into cd fld Dec
put rnd10(60*abs(frac(dec1950))) into cd fld Decm
end conv2
on enterInField
type tab
end enterInField
on returnInField
type tab
end returnInField
-- part 1 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=135 top=84 right=104 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RA
-- part 8 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=183 top=84 right=104 bottom=220
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RAm
-- part 2 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=128 top=108 right=127 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Dec
-- part 9 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=183 top=108 right=127 bottom=220
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Decm
-- part 5 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=135 top=135 right=155 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RA2
-- part 10 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=183 top=135 right=155 bottom=220
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RA2m
-- part 6 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=129 top=160 right=179 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Dec2
-- part 11 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=184 top=160 right=179 bottom=220
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Dec2m
-- part 3 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=135 top=189 right=209 bottom=164
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Al
-- part 4 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=135 top=213 right=233 bottom=180
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Az
-- part 7 (button)
-- low flags: 00
-- high flags: 8005
-- rect: left=286 top=101 right=124 bottom=451
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Use 1950 Coords
----- HyperTalk script -----
on mouseUp
set hilite of me to not hilite of me
set hilite of btn "Use 2000 Coords" to not hilite of me
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=288 top=222 right=244 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Calculate
----- HyperTalk script -----
on mouseUp
calc
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 0004
-- rect: left=471 top=148 right=180 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 2478 / 2478
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Button
----- HyperTalk script -----
on mouseUp
show cd fld help
end mouseUp
-- part 15 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=38 top=183 right=283 bottom=431
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
hide cd fld help
end mouseUp
-- part 16 (button)
-- low flags: 00
-- high flags: C005
-- rect: left=286 top=145 right=168 bottom=451
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Use 2000 Coords
----- HyperTalk script -----
on mouseUp
set hilite of me to not hilite of me
set hilite of btn "Use 1950 Coords" to not hilite of me
end mouseUp
-- part contents for background part 11
----- text -----
Sidereal Time = 6:10
6.168512
-- part contents for background part 12
----- text -----
Universal Time = 22:33
22.564167
-- part contents for card part 8
----- text -----
39.4
-- part contents for card part 2
----- text -----
2
-- part contents for card part 9
----- text -----
38.8
-- part contents for card part 4
----- text -----
270┬░
-- part contents for card part 3
----- text -----
5┬░
-- part contents for card part 10
----- text -----
42
-- part contents for card part 6
----- text -----
2
-- part contents for card part 11
----- text -----
54
-- part contents for card part 15
----- text -----
Click the Calculate button to calculate altitude and azimuth from the coordinates for the selected epoch.
If the 1950 epoch coordinates are given, then the 2000 epoch coordinates are calculated and vice versa.
-- part contents for card part 5
----- text -----
1
-- part contents for card part 1
----- text -----
1